# coding:utf-8
from odoo import models, fields, api, _


class ZfyStockLot(models.Model):
    _inherit = 'stock.pack.operation'

    @api.onchange('lot_id')
    def _onchange_lot_id(self):
        for lot in self.pack_lot_ids:
            lot.lot_uom = lot.lot_id.lot_uom
            lot.lot_uom_ratio = lot.lot_id.lot_uom_ratio
            lot.lot_uom_qty = lot.lot_id.lot_uom_qty
